<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    </head>
    <body>
        <div id="app">
            <section></section>
            <a href="">sina</a>
            <span title="news">yahoo</span>
            <h2>houdunren.com@@</h2>
            <a href="">tom.com</a>
        </div>

        <script type="module">
            import util from './util.js'
            const app = document.getElementById('app')

            let h2 = app.querySelector('h2')
            const aLinks = util.siblingsByTagName(h2, 'a')
            util.removeChild(app, aLinks)

            // console.log(h2.parentElement)

            // const nodes = util.previousSibling(h2)
            // console.log(nodes)

            // console.log(h2.previousSibling.previousSibling.previousSibling.previousSibling)
        </script>
    </body>
</html>
